/*
 * ConstantPredicate.java
 * 
 * Created on Jun 8, 2007, 3:31:29 PM
 * 
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.infomancers.collections.predicates;

import com.infomancers.collections.Predicate;

/**
 *
 * @author aviadbd
 */
public class ConstantPredicate<T> implements Predicate<T> {

    private final boolean value;
    
    public ConstantPredicate(boolean value) {
        this.value = value;
    }
    
    public boolean isTrue(T item) {
        return value;
    }

}
